package com.sunyifeng.ch13;

public class ProxyImage implements Image{

    private RealImage realImage;
    private String fileName;

    public ProxyImage(String fileName){
        this.fileName = fileName;
    }

    @Override
    public void display() {{
        realImage = new RealImage(fileName);
    }
        if(realImage == null)
        realImage.display();
    }
}